-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ADD] estate: Added new real estate property management module #110
Conversation
The new module includes: - Model: estate.property with fields such as name, description, selling_price, availability_date, bedrooms, state, and active. - Views: Tree and form views for managing estate properties. - Security: Access rights defined in ir.model.access.csv.
The new module includes: - Model: estate.property with fields such as name, description, selling_price, availability_date, bedrooms, state, and active. - Views: Tree and form views for managing estate properties. - Security: Access rights defined in ir.model.access.csv.
The new module includes: - Model: estate.property with fields such as name, description, selling_price, availability_date, bedrooms, state, and active. - Views: Tree and form views for managing estate properties. - Security: Access rights defined in ir.model.access.csv.
The new module includes: - Model: estate.property with fields such as name, description, selling_price, availability_date, bedrooms, state, and active. - Views: Tree and form views for managing estate properties. - Security: Access rights defined in ir.model.access.csv.
The new module includes: - Model: estate.property with fields such as name, description, selling_price, availability_date, bedrooms, state, and active. - Views: Tree and form views for managing estate properties. - Security: Access rights defined in ir.model.access.csv.
6aa9cca
to
28a53ce
Compare
Enhanced estate module by updating estate_property model and views, adding new m odels for estate_property_offer, estate_property_tag, and estate_property_type, and refining access control and menus. Improved estate_property_views functional ity for better user experience.
28a53ce
to
0ec7bd9
Compare
Update UI elements for improved user experience. - Added SQL and python constraints. - Enhanced User interface of the module.
19a0abb
to
45e4a94
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @akya-odoo
I have added some remarks to cleanup the code.
Can you please have a look?
Thanks!!
estate/models/__init__.py
Outdated
@@ -0,0 +1 @@ | |||
from . import estate_property, estate_property_type, estate_property_tag, estate_property_offer, res_users |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from . import estate_property, estate_property_type, estate_property_tag, estate_property_offer, res_users | |
from . import estate_property | |
from . import estate_property_offer | |
from . import estate_property_tag | |
from . import estate_property_type | |
from . import res_users |
Generally, we import every model in new lines.
|
||
|
||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from odoo import models, fields, api | ||
from datetime import timedelta |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from odoo import models, fields, api | |
from datetime import timedelta | |
from datetime import timedelta | |
from odoo import api, fields, model | |
Generally we follow a convention in which we first we import all the external libraries and then the import of odoos in alphabetical order.
</record> | ||
|
||
|
||
</odoo> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need a blank line at EOF
</p> | ||
</field> | ||
</record> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same for below also
estate/models/estate_property.py
Outdated
_sql_constraints = [ | ||
('check_expected_price', 'CHECK(expected_price > 0)', 'The expected price must be strictly positive.'), | ||
('check_selling_price', 'CHECK(selling_price >= 0)', 'The selling price must be positive.') | ||
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally we define constraints just after field defination.
self.status = 'refused' | ||
return True | ||
|
||
_sql_constraints = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here for constraints
<button type="action" name="estate.action_estate_property_offer" string="Offers" class="oe_stat_button" icon="fa-archive" style= "align: right;"> | ||
</button> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<button type="action" name="estate.action_estate_property_offer" string="Offers" class="oe_stat_button" icon="fa-archive" style= "align: right;"> | |
</button> | |
<div name="button_box"> | |
<button class="oe_stat_button" type="action" name="%(estate.action_estate_property_offer)d" | |
icon="fa-pencil-square-o"> | |
<field string="Offers" name="offer_count" widget="statinfo"/> | |
</button> | |
</div> |
I think we can do something like this inside sheet instead of header to properly format the stat button.
<sheet> | ||
<div> | ||
<h1><field name="name"/></h1> | ||
<field name="offer_count" readonly="1"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need for this after applying the previous comment.
estate/models/estate_property.py
Outdated
self.state = "canceled" | ||
elif self.state == "sold": | ||
raise UserError("This property can't be canceled as it is sold already") | ||
return True |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return True |
I think it is not necessary check for all the actions.
for record in self: | ||
if record.create_date: | ||
record.date_deadline = record.create_date + timedelta(days=record.validity) | ||
else: | ||
record.date_deadline = fields.Date.today() + timedelta(days=record.validity) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for record in self: | |
if record.create_date: | |
record.date_deadline = record.create_date + timedelta(days=record.validity) | |
else: | |
record.date_deadline = fields.Date.today() + timedelta(days=record.validity) | |
record.deadline_date = record.property_id.create_date + relativedelta( | |
days=record.validity | |
) |
if record.date_deadline and record.create_date: | ||
create_date_date = record.create_date.date() | ||
record.validity = (record.date_deadline - create_date_date).days | ||
else: | ||
record.validity = 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if record.date_deadline and record.create_date: | |
create_date_date = record.create_date.date() | |
record.validity = (record.date_deadline - create_date_date).days | |
else: | |
record.validity = 0 | |
record.validity = (record.deadline_date - record.property_id.create_date.date()).days |
Can you give it a try? Make sure to check all possible cases.
same for compute also
- Updated data files to reflect recent changes in property and offer models. - Enhanced security for estate-related models. - Added security rules to ensure proper access levels for different user roles.
ff21063
to
e6f6928
Compare
- Implemented patient form with linked guarantor information (phone, email, etc) - Added functionality to handle invoicing for dental treatments - Updated UI elements for better user experience and accessibility
Implemented patient details page for Dental module. Added controller route to di splay patient-specific information with sections for Personal, Medical History, Medical Aid, and Dental History. Integrated responsive design with Bootstrap car ds and breadcrumbs navigation.
bcf2156
to
c1279d3
Compare
Created a module for managing installments, including a cron job for invoices. Added a settings section specifically for installments. Implemented a wizard for adding EMI (Equated Monthly Installments). Introduced a button to redirect to the document module. Implemented an invoice schedule that triggers when the delay process exceeds the specified days. Added a smart button for document upload requests. Developed a wizard for document requests related to sales orders.
c1279d3
to
6beee95
Compare
add warranty configuration in sale setting add button in sale order add wizard
- Added warranty configuration in Sales settings. - Added 'Add Warranty' button in Sale Order form. - Created a wizard to handle warranty selection and application.
Added real estate module for training